package io;

import java.io.FileReader;
import java.io.IOException;

public class demo6 {
	public static void main(String[] args) throws IOException {
		FileReader fr = new FileReader("E:\\javacode\\111\\src\\io\\a.txt");
		/*
		 * 
		 * int len=0;//每次读取的有效字节个数 while ((len=fr.read())!=-1) {
		 * System.out.print((char)len); }
		 */
		char[] bytes = new char[1024];
		int len = 0; // 每次读取的有效字节个数
		while ((len = fr.read(bytes)) != -1) {
			System.out.println(new String(bytes,0,len));
		}
		fr.close();
	}
}
